<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<script type="text/javascript">
</script>
<div>
	<form id="upload" action="uploadPic.do" method="post" enctype="multipart/form-data">
		<table id="upload_detail">
			<tr>
				<th width="75px">商品状态</th>
				<td>
				<select name="enabled">
				<option value="0" >下架</option>
				<option value="1" >上架</option>	
				</select>
				</td>
			</tr>
			<tr>
			<th width="75px">性&nbsp;&nbsp;&nbsp;&nbsp;别</th>
				<td>
				<select name="gender">
				<option value="0" >不限</option>
				<option value="1" >男</option>	
				<option value="2" >女</option>
				</select>	
				</td>
			</tr>
			<tr>
			<th width="75px">类&nbsp;&nbsp;&nbsp;&nbsp;型</th>
				<td>
				<select name="type">
				<option value="1" >发型</option>
				<option value="2" >衣服</option>	
				<option value="3" >裤子</option>
				<option value="4" >背景</option>	
				<option value="5" >完整形象</option>
				</select>	
				</td>
			</tr>
			<tr>
			<th width="75px">图&nbsp;&nbsp;&nbsp;&nbsp;层</th>
				<td>
				<select name="picFloor">
				<option value="0" >0</option>
				<option value="5" >5</option>	
				<option value="10" >10</option>
				<option value="15" >15</option>	
				<option value="20" >20</option>
				<option value="25" >25</option>	
				<option value="30" >30</option>
				<option value="35" >35</option>	
				<option value="40" >40</option>
				</select>	
				</td>
			</tr>
			<tr>
			<th width="75px">价&nbsp;&nbsp;&nbsp;&nbsp;格</th>
				<td>
					<input type="text" name="price"/>
				</td>
			</tr>
			<tr>
              <th width="75px">形象图片</th>
              <td>
               <input name="pic" type="file"  id="pic" onChange="showPic(this)"/>
              <span id="picPrev"></span>
				<script>
				function showPic(obj)
				{
					if(obj!=null && obj.value!="")
					{
						document.all.picPrev.innerHTML = "<br><img src=\""+ obj.value +"\" />"
					}
				}
				</script>								
				</td>   
            </tr>
       
			<tr>
			<th width="75px">由原图生成效果图</th>
				<td>
					<input type="checkbox" id="enabledPic" name="enabledPic" value="1" onclick="hide()"/>
				<script>
				function hide(){
					
					var epic=document.getElementsByName("enabledPic");
					if(epic[0].checked){
						document.getElementById("tr").style.display='none';
					}else{	
						document.getElementById("tr").style.display='block';
					}
				}
				</script>	
				</td>			
			</tr>
			<tr id="tr">
			<th width="75px">效果图</th>
				<td><input type="file" name="picEffect" id="picEffect" onChange="showPic1(this)"/>
				<span id="picPrev1"></span>
				<script>
				function showPic1(obj)
				{
					if(obj!=null && obj.value!="")
					{
						document.all.picPrev1.innerHTML = "<br><img src=\""+ obj.value +"\" />"
					}
				}
				</script>	
				</td>
			</tr>
			<tr>
				<td><input type="submit" name="保存" value="保存"/></td>
			</tr>
		</table>
	</form>
</div>
